<template lang ="html">
  <div id="app">
    <div id="nav">
      <!-- <router-link to="/">Home</router-link>|
      <router-link to="/About">About</router-link>|
      <router-link to="/List">List</router-link>-->
      <div class="cat_movie">企鹅电影</div>
       <i class='iconfont icon-zuojiantou' @click="Return"></i>
    </div>
    <!-- 用于显示路由对应的视图 -->
    <transition name="slide">
      <keep-alive>
        <router-view/>
      </keep-alive>
    </transition>
  </div>
</template>

<style lang="scss" scoped>
.slide-enter {
  opacity: 0;
  transform: translateY(30px);
}
.slide-enter-active {
  transition: all 1s;
}
.slide-enter-to {
  opacity: 1;
  transform: translateY(0);
}

#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
#nav {
  // padding: 30px;
  a {
    font-weight: bold;
    color: #2c3e50;
    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
.cat_movie {
  background-color: #e54847;
  color: white;
  font-size: 20px;
  font-weight: 400;
  height: 10vw;
  text-align: center;
  display: block;
  line-height: 45px;
  position: relative;
}

i {
  top: 2px;
  left: 10px;
  position: absolute;
  font-size: 35px;
  color: white;
}
</style>

<script>
export default {
  data() {
    return {
      turn: ""
    };
  },
  methods: {
    Return() {
      this.$router.go(-1);//返回上一层
    }
  }
};
</script>

